class ContactData {
  int status;
  String message;
  List<Contact> contacts;

  ContactData({this.status, this.message, this.contacts});

  ContactData.fromJson(Map<String, dynamic> json) {
    status = json['status'];
    message = json['message'];
    if (json['data'] != null) {
      contacts = new List<Contact>();
      json['data'].forEach((v) {
        contacts.add(new Contact.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['status'] = this.status;
    data['message'] = this.message;
    if (this.contacts != null) {
      data['data'] = this.contacts.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class Contact {
  String type;
  String avatar;
  String sId;
  String uuid;
  int created;
  int modified;
  String username;
  bool activated;
  String userId;
  String mobile;
  String createdTime;
  String updatedTime;

  Contact(
      {this.type,
      this.avatar,
      this.sId,
      this.uuid,
      this.created,
      this.modified,
      this.username,
      this.activated,
      this.userId,
      this.mobile,
      this.createdTime,
      this.updatedTime});

  Contact.fromJson(Map<String, dynamic> json) {
    type = json['type'];
    avatar = json['avatar'];
    sId = json['_id'];
    uuid = json['uuid'];
    created = json['created'];
    modified = json['modified'];
    username = json['username'];
    activated = json['activated'];
    userId = json['user_id'];
    mobile = json['mobile'];
    createdTime = json['created_time'];
    updatedTime = json['updated_time'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['type'] = this.type;
    data['avatar'] = this.avatar;
    data['_id'] = this.sId;
    data['uuid'] = this.uuid;
    data['created'] = this.created;
    data['modified'] = this.modified;
    data['username'] = this.username;
    data['activated'] = this.activated;
    data['user_id'] = this.userId;
    data['mobile'] = this.mobile;
    data['created_time'] = this.createdTime;
    data['updated_time'] = this.updatedTime;
    return data;
  }
}
